#   Copyright (c)  2021 FromVB2Python
#   FromVB2Python is licensed under Mulan PSL v2.
#   You can use this software according to the terms and conditions of the Mulan PSL v2. 
#   You may obtain a copy of Mulan PSL v2 at:
#            http://license.coscl.org.cn/MulanPSL2 
#   THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.  
#   See the Mulan PSL v2 for more details.

# 057-选考A-环形数据排序-202011-15温州选考模拟，shell版
# 输入数据为： 1 11 19 18 0 16 8 9 17 4
# 排序结果为： 9 8 4 1 0 19 18 17 16 11
# 输入
nlst = list(map(int,input('请输入10个用空格分开的整数:').split()))
if not nlst:
    print('输入有误，使用默认数据.')
    nlst = [1,11,19,18,0,16,8,9,17,4]
print('输入数据为：',*nlst)
# 获取最小数的位置
mn = nlst.index(min(nlst))
# 排序与环形化处理
nlst.sort()
nlst = nlst[mn::-1] + nlst[-1:mn:-1]
# 输出
print('排序结果为：',*nlst)
